package com.ruoyi.datastatistics.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseDO;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;


/**
 * 小-历史数据对象 t_meter_history_data
 *
 * @author ruoyi
 * @date 2023-09-06
 */
@Data
@TableName("t_meter_history_data")
public class MeterHistoryData extends BaseDO {
    private static final long serialVersionUID = 1L;

    /**
     * 平台表单自增主键
     */
    @TableId
    private Long id;

    @TableField(exist = false)
    private String sheetsCode;

    /**
     * 设备归属水司
     */
    @TableField("tenant_id")
    private String tenantId;


    @TableField("location_nb")
    private String locationNb;
    /**
     * 厂家编号
     */
    @TableField("supplier_id")
    private String supplierId;

    @TableField(exist = false)
    @Excel(name = "用户名称")
    private String userName;

    @TableField(exist = false)
    @Excel(name = "用户编号")
    private String userId;

    /**
     * 门牌号
     */
    @TableField(exist = false)
    private String installAddress;

    /**
     * 终端编号
     */
    @Excel(name = "设备编号")
    @TableField("terminal_id")
    private String terminalId;

    /**
     * 用户通讯地址
     */
    @Excel(name = "用户通讯地址")
    @TableField(exist = false)
    private String userAddress;

    /**
     * 水表读数
     */
    @Excel(name = "水表读数(m³)")
    @TableField("total_flow")
    private BigDecimal totalFlow;

    /**
     * 终端电压
     */
    @Excel(name = "终端电压(V)")
    @TableField("terminal_vol")
    private BigDecimal terminalVol;
    /**
     * 阀门状态(0：关，1：开)
     */
    @Excel(name = "阀门状态", readConverterExp = "0=关,1=开")
    @TableField("valve_state")
    private Integer valveState;
    /**
     * 是否带阀控(0：否，1：是)
     */
    @TableField(value = "valve_control", exist = false)
    private Integer valveControl;
    /**
     * 抄表时间
     */
    @Excel(name = "抄表时间")
    @TableField("read_date")
    private String readDate;

    //    @Excel(name = "正向读数")
    @TableField("read_number")
    private BigDecimal readNumber;

    //    @Excel(name = "反向读数")
    @TableField("reverse_number")
    private BigDecimal reverseNumber;

    //    @Excel(name = "终端信号强度")
    @TableField("terminal_csq")
    private Integer terminalCsq;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @TableField("create_date")
    private Date createDate;

    @TableField(exist = false)
    private String communicateAddress;

    @TableField(exist = false)
    private String belongDepartment;

    @TableField(exist = false)
    private Integer loginUserId;

    @TableField(exist = false)
    private Integer systemFlag;
}
